
savename1 = 'pp2_a';
load('Dat/plot_dsf_test_ex9_train2_test1', 'noise', 'fid', 'sdv')
fid1 = fid;
sdv1 = sdv;
noise1 = noise;
legend1 = ["expected noise", "noisy sample", "[4,2,1,2,4] sparse \newlinedenoised"];

PlotDenoisingVsNoise(noise1, fid1,...
    'sdv_fidelity', sdv1, 'savename', savename1, 'legend', legend1, 'lposition', [0.28,0.21],...
    'xlabel', 'spin-flip probability p', 'ylabel', 'fidelity with GHZ-0',...
    'plotstyle', {{"+",'MarkerSize', 5, 'LineWidth', 1.5, 'CapSize', 0},...
    {".", 'MarkerSize', 25, 'LineWidth', 1.5},...
    {"o", 'MarkerSize', 10, 'LineWidth', 1.5, 'CapSize', 20}})

savename2 = 'pp2_b';
load('Dat/plot_du_test_ex9_train1_test1', 'noise', 'fid', 'sdv')
fid2 = fid;
sdv2 = sdv;
noise2 = noise;
legend2 = ["noisy", "[4,2,1,2,4] sparse \newlinedenoised"];

PlotDenoisingVsNoise(noise2, fid2,...
    'sdv_fidelity', sdv2, 'savename', savename2, 'legend', legend2, 'lposition', [0.28,0.19],...
    'xlabel', 'noise strength q', 'ylabel', 'fidelity with GHZ-0',...
    'plotstyle', {{".", 'MarkerSize', 25, 'LineWidth', 1.5, 'Color', [0.85,0.325,0.098]},...
    {"o", 'MarkerSize', 10, 'LineWidth', 1.5, 'CapSize', 20, 'Color', [0.929,0.694,0.125]}})
